<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
    <script>
        //执行上下文：js代码执行的环境
        let name = 'tom';
        function fn1(){
            let age = 10;
            function fn2(){
                let sex = '男';
                console.log(name);
                console.log(age);
                console.log(sex);
            }
            fn2();
        }
        fn1();
    </script>
</html>